home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / movenow.zip / MOVENOW.PRG < prev   
Text File  |  1993-04-12  |  2KB  |  58 lines

  1. program Movenow;  {Display moving messages on screen}
  2.    uses crt, dos;
  3.  
  4. const
  5.    TextSize = 100;                                      {Mod. #1}
  6.  
  7. type
  8.    LineSize      = string[80];
  9.    TextArrayType = array[1..TextSize] of LineSize;
  10.  
  11. var
  12.    TextArray                                    : TextArrayType;
  13.    J, K, LineCount, LeftX, RightX, Y, DelayTime : integer;
  14.    Reply, Reply2                                : char;
  15.  
  16. {$I CursorOn.PSL}
  17. {$I KeyHit.PSL}
  18. {$I KeyTxt.PSL}
  19. {$I Scroll.PSL}
  20. {$I TextBox.PSL}
  21. {$I WaitKey.PSL}
  22.  
  23. BEGIN
  24.    textmode(bw80);
  25.    clrscr;
  26.    writeln('NewsWire - Create moving messages.');
  27.    writeln;
  28.    LeftX     := 2;                                      {Mod. #2}
  29.    RightX    := 39;                                     {Mod. #2}
  30.    Y         := 12;                                     {Mod. #2}
  31.    DelayTime := 200;                                    {Mod. #3}
  32.    LineCount := 0;
  33.    KeyTxt(TextArray, LineCount);
  34.    writeln;
  35.    writeln('Press a key to start the news wire.');
  36.    writeln('Once it begins, you can press any key to stop it.');
  37.    waitkey;
  38.    textmode(bw40);                                      {Mod. #4}
  39.    textbox(LeftX - 1, Y - 1, RightX + 1, Y + 1);
  40.    repeat
  41.       for J := 1 to LineCount do
  42.          for K := 1 to length(TextArray[J]) do
  43.             begin
  44.                CursorOn(false);
  45.                gotoxy(RightX, Y);
  46.                write(TextArray[J][K]);
  47.                delay(DelayTime);
  48.                scroll(LeftX, Y, RightX, Y, 0);
  49.                if KeyHit(Reply, Reply2) then
  50.                   begin
  51.                      textmode(bw80);
  52.                      CursorOn(true);
  53.                      halt
  54.                   end
  55.             end
  56.    until false
  57. END.
  58.